﻿using System;

namespace PropertyExpression.TypedDataBinding.Web.WebControls
{
    public class TextBox : System.Web.UI.WebControls.TextBox
    {
        public event Action<TextBox> TypedInit;

        public TextBox()
        {
            Init += delegate { if (TypedInit != null) TypedInit(this); };
            Init += delegate { this.DisableViewState(); };
        }
    }

    public class Literal : System.Web.UI.WebControls.Literal
    {
        public event Action<Literal> TypedInit;

        public Literal()
        {
            Init += delegate { if (TypedInit != null) TypedInit(this); };
            Init += delegate { this.DisableViewState(); };
        }
    }

    public class Repeater : System.Web.UI.WebControls.Repeater
    {
        public event Action<Repeater> TypedInit;

        public Repeater()
        {
            Init += delegate { if (TypedInit != null) TypedInit(this); };
        }
    }
}
